<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>title</title>
</head>
<body>
<form action="" method="get">

    用户&nbsp;名 ：<input type="text" name="" id="uname" placeholder="请输入用户名" required>
    <br>
    密&nbsp;&nbsp;&nbsp; 码： <input type="password" name="" id="psw" placeholder="请输入密码" required>
    <br>
    年&nbsp;&nbsp;&nbsp; &nbsp;龄：<input type="number" name="" min="1" max="100" id="age" placeholder="20" required>
    <br>
    选择班级 <select id="cno">
    <option value="">计科211</option>
    <option value="">计科212</option>
    <option value="">计科213</option>
    <option value="">计科214</option>
</select>
    <br>
    男<input type="checkbox" name="" id="sex" value="男" Checked>
    女<input type="checkbox" name="" id="sex" value="女">
    <br>
    <button type="submit" onclick="GetInfomation">提交</button>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <button type="reset">重置</button>


</form>
<script>

    function GetInfomation() {

        var username = document.getElementById("uname").innerHTML;
        var password = document.getElementById("psw").innerHTML;
        var cno = document.getElementById("cno").innerHTML;
        var sex = document.getElementById("sex").innerHTML;

        alert("欢迎用户：" + username + "！")

    }
</script>
</body>
</html>